package com.example.testspringes.modul;

import com.example.testspringes.json.DateJosn;
import com.example.testspringes.json.TestJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.DateSerializer;
import lombok.*;

import java.io.Serializable;
import java.util.Date;
import java.util.LinkedHashMap;

/**
 * @Description: //TODO
 * @ProjectName: testspringes
 * @Package: com.example.testspringes.modul
 * @Author: FX
 * @CreateDate: 2018/11/22 17:51
 * @Version: 1.0
 * Copyright: Copyright (c) 2018
 */


@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Person  implements Serializable {

    private String name;
    private Integer age;
    private String gender;
    @JsonSerialize(using = TestJson.class)
    private String birth;
    @JsonSerialize(using = DateJosn.class)
    private Long date;

    public Person(String name, Integer age, String gender, String birth) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.birth = birth;
    }
}
